home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / c / Vperf5.1-src.lha / Viewperf5.1 / viewperf / qadF.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-04  |  23.3 KB  |  555 lines

  1. #ifdef WIN32
  2. #include <windows.h>
  3. #endif
  4. #include <GL/gl.h>
  5. #include "viewperf.h"
  6. #include "vpDefine.h"
  7.  
  8. void FUNCTION(struct ThreadBlock *tb) {
  9.         int polyi,verti;
  10.     int numverts;
  11.     int polycount = tb->np;
  12. #ifdef BATCH
  13.     int groupi;
  14.     int batchi;
  15.     int leftoveri;
  16.     int batchcount = tb->batchnum;
  17.     int groupcount = tb->batchgroups;
  18.     int leftovercount = tb->batchleftovers;
  19. #endif
  20.     int *vertindex;
  21.         GLenum mode = tb->mode;
  22. #ifdef EXTERNAL
  23.         GLenum capability = tb->capability;
  24.         void (*lExternfunc)(GLenum) = tb->externfunc;
  25. #endif
  26.  
  27. #ifdef BY_TWO
  28.     int *startvertindex;
  29. #endif
  30.  
  31.     struct vector *pvert=tb->vert;
  32.     struct plygon *pply=tb->ply;
  33.  
  34. #ifndef FUNCTION_CALLS
  35. #ifdef WIN32
  36.         void (APIENTRY *glVertex3fvP)(const GLfloat *);
  37. #else
  38.         void (*glVertex3fvP)(const GLfloat *);
  39. #endif
  40. #endif 
  41.  
  42. #if defined(FACET_NORM) || defined(VERT_NORM)
  43.     struct vector *pvnorm=tb->vnorm;
  44. #ifndef FUNCTION_CALLS
  45. #ifdef WIN32
  46.         void (APIENTRY *glNormal3fvP)(const GLfloat *);
  47. #else
  48.         void (*glNormal3fvP)(const GLfloat *);
  49. #endif
  50. #endif /* ifndef FUNCTION_CALLS */
  51. #endif
  52.  
  53. #if defined(FACET_COLOR) || defined(VERT_COLOR)
  54.     struct colorvector *pvcolor=tb->vcolor;
  55. #ifndef FUNCTION_CALLS
  56. #ifdef WIN32
  57.         void (APIENTRY *glColorP)(const GLfloat *);
  58. #else
  59.         void (*glColorP)(const GLfloat *);
  60. #endif
  61. #endif  /* ifndef FUNCTION_CALLS */
  62. #endif
  63.  
  64. #ifdef TEXTURE
  65.     struct vector *ptexture=tb->texture;
  66. #ifndef FUNCTION_CALLS
  67. #ifdef WIN32
  68.         void (APIENTRY *glTexCoord2fvP)(const GLfloat *);
  69. #else
  70.         void (*glTexCoord2fvP)(const GLfloat *);
  71. #endif
  72. #endif /* ifndef FUNCTION_CALLS */
  73. #endif
  74.  
  75. #ifndef FUNCTION_CALLS
  76. #ifdef TEXTURE
  77.         glTexCoord2fvP = glTexCoord2fv;
  78. #endif
  79. #if defined(FACET_COLOR) || defined(VERT_COLOR)
  80.         glColorP = tb->ColorP;
  81. #endif
  82. #if defined(FACET_NORM) || defined(VERT_NORM)
  83.         glNormal3fvP = glNormal3fv;
  84. #endif
  85.         glVertex3fvP = glVertex3fv;
  86. #endif  
  87.  
  88.  
  89. #ifdef BATCH
  90.     polyi = polycount;
  91.         for(groupi=groupcount-1;groupi>=0;groupi--) {
  92.             glBegin(mode);
  93.             for(batchi=batchcount-1;batchi>=0;batchi--) {
  94.         polyi--;
  95. #else
  96.         for(polyi=polycount-1;polyi>=0;polyi--) {
  97. #endif
  98.         numverts = pply[polyi].numverts;
  99.         vertindex = pply[polyi].index;
  100. #ifdef BY_TWO
  101.         startvertindex = vertindex;
  102. #endif
  103. #ifdef EXTERNAL
  104.                 lExternfunc(capability);
  105. #endif
  106. #if    defined(FACET_COLOR) && !defined(FUNCTION_CALLS)
  107.                 (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  108. #elif  defined(FACET_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  109.                 glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  110. #elif  defined(FACET_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  111.                 glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  112. #endif
  113. #if    defined(FACET_NORM) && !defined(FUNCTION_CALLS)
  114.                 (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  115. #elif  defined(FACET_NORM) &&  defined(FUNCTION_CALLS)
  116.                 glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  117. #endif
  118. #ifndef BATCH
  119.                 glBegin(mode);
  120. #endif
  121. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  122.                     (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  123. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  124.                     glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  125. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  126.                     glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  127. #endif
  128. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  129.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  130. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  131.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  132. #endif
  133. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  134.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  135. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  136.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  137. #endif
  138. #ifdef FUNCTION_CALLS
  139.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  140. #else
  141.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  142. #endif
  143.  
  144. #ifdef BY_TWO
  145.             vertindex++;
  146.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  147.                     (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  148.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4) 
  149.                     glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  150.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4) 
  151.                     glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  152.   #endif
  153.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  154.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  155.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  156.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  157.   #endif
  158.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  159.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  160.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  161.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  162.   #endif
  163.   #ifdef FUNCTION_CALLS
  164.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  165.   #else
  166.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  167.   #endif
  168. #else
  169.             vertindex++;
  170. #endif
  171.  
  172. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  173.                     (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  174. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  175.                     glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  176. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  177.                     glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  178. #endif
  179. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  180.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  181. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  182.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  183. #endif
  184. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  185.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  186. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  187.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  188. #endif
  189. #ifdef FUNCTION_CALLS
  190.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  191. #else
  192.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  193. #endif
  194.  
  195. #ifdef BY_TWO
  196.             vertindex++;
  197.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  198.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  199.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  200.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  201.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  202.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  203.   #endif
  204.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  205.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  206.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  207.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  208.   #endif
  209.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  210.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  211.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  212.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  213.   #endif
  214.   #ifdef FUNCTION_CALLS
  215.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  216.   #else
  217.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  218.   #endif
  219. #else
  220.             vertindex++;
  221. #endif
  222.  
  223. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  224.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  225. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  226.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  227. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  228.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  229. #endif
  230. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  231.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  232. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  233.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  234. #endif
  235. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  236.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  237. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  238.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  239. #endif
  240. #ifdef FUNCTION_CALLS
  241.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  242. #else
  243.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  244. #endif
  245.  
  246. #ifdef BY_TWO
  247.             vertindex++;
  248.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  249.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  250.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  251.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  252.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  253.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  254.   #endif
  255.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  256.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  257.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  258.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  259.   #endif
  260.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  261.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  262.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  263.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  264.   #endif
  265.   #ifdef FUNCTION_CALLS
  266.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  267.   #else
  268.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  269.   #endif
  270. #else
  271.             vertindex++;
  272. #endif
  273.  
  274. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  275.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  276. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  277.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  278. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  279.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  280. #endif
  281. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  282.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  283. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  284.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  285. #endif
  286. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  287.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  288. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  289.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  290. #endif
  291. #ifdef FUNCTION_CALLS
  292.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  293. #else
  294.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  295. #endif
  296.  
  297. #ifdef BY_TWO
  298.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  299.                         (*glColorP)((const GLfloat *) (pvcolor + *startvertindex));
  300.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4) 
  301.                         glColor3fv((const GLfloat *) (pvcolor + *startvertindex));
  302.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4) 
  303.                         glColor4fv((const GLfloat *) (pvcolor + *startvertindex));
  304.   #endif
  305.   #if     defined(TEXTURE) && !defined(FUNCTION_CALLS)
  306.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *startvertindex));
  307.   #elif   defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  308.                         glTexCoord2fv((const GLfloat *) (ptexture + *startvertindex));
  309.   #endif
  310.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  311.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *startvertindex));
  312.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  313.                         glNormal3fv((const GLfloat *) (pvnorm + *startvertindex));
  314.   #endif
  315.   #ifdef FUNCTION_CALLS
  316.                         glVertex3fv((const GLfloat *) (pvert + *startvertindex));
  317.   #else
  318.                         (*glVertex3fvP)((const GLfloat *) (pvert + *startvertindex));
  319.   #endif
  320. #endif
  321.  
  322. #ifndef BATCH
  323.                 glEnd();
  324. #endif
  325.         }
  326. #ifdef BATCH
  327.         glEnd();
  328.     }
  329.           glBegin(mode);
  330.            for(leftoveri=leftovercount-1;leftoveri>=0;leftoveri--) {
  331.         polyi--;
  332.         numverts = pply[polyi].numverts;
  333.         vertindex = pply[polyi].index;
  334. #ifdef BY_TWO
  335.                 startvertindex = vertindex;
  336. #endif
  337. #if    defined(FACET_COLOR) && !defined(FUNCTION_CALLS)
  338.                 (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  339. #elif  defined(FACET_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  340.                 glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  341. #elif  defined(FACET_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  342.                 glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  343. #endif
  344. #if    defined(FACET_NORM) && !defined(FUNCTION_CALLS)
  345.                 (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  346. #elif  defined(FACET_NORM) &&  defined(FUNCTION_CALLS)
  347.                 glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  348. #endif
  349. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  350.                     (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  351. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  352.                     glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  353. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  354.                     glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  355. #endif
  356. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  357.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  358. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  359.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  360. #endif
  361. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  362.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  363. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  364.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  365. #endif
  366. #ifdef FUNCTION_CALLS
  367.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  368. #else
  369.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  370. #endif
  371.  
  372. #ifdef BY_TWO
  373.             vertindex++;
  374.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  375.                     (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  376.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  377.                     glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  378.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  379.                     glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  380.   #endif
  381.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  382.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  383.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  384.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  385.   #endif
  386.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  387.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  388.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  389.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  390.   #endif
  391.   #ifdef FUNCTION_CALLS
  392.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  393.   #else
  394.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  395.   #endif
  396. #else
  397.             vertindex++;
  398. #endif
  399.  
  400. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  401.                     (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  402. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  403.                     glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  404. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  405.                     glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  406. #endif
  407. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  408.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  409. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  410.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  411. #endif
  412. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  413.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  414. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  415.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  416. #endif
  417. #ifdef FUNCTION_CALLS
  418.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  419. #else
  420.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  421. #endif
  422.  
  423. #ifdef BY_TWO
  424.             vertindex++;
  425.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS) 
  426.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  427.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4) 
  428.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  429.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4) 
  430.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  431.   #endif   
  432.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  433.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  434.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  435.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  436.   #endif
  437.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  438.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  439.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  440.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  441.   #endif
  442.   #ifdef FUNCTION_CALLS
  443.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  444.   #else
  445.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  446.   #endif
  447. #else
  448.             vertindex++;
  449. #endif
  450.  
  451. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  452.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  453. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  454.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  455. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  456.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  457. #endif
  458. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  459.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  460. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  461.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  462. #endif
  463. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  464.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  465. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  466.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  467. #endif
  468. #ifdef FUNCTION_CALLS
  469.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  470. #else
  471.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  472. #endif
  473.  
  474. #ifdef BY_TWO
  475.             vertindex++;
  476. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS) 
  477.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  478. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4) 
  479.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex)); 
  480. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4) 
  481.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex)); 
  482. #endif   
  483. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS) 
  484.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  485. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS) 
  486.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex)); 
  487. #endif
  488. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  489.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  490. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  491.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  492. #endif   
  493. #ifdef FUNCTION_CALLS 
  494.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  495. #else 
  496.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  497. #endif   
  498. #else
  499.             vertindex++;
  500. #endif
  501.  
  502. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS) 
  503.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  504. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4) 
  505.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex)); 
  506. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4) 
  507.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex)); 
  508. #endif   
  509. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS) 
  510.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  511. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS) 
  512.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex)); 
  513. #endif
  514. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  515.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  516. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  517.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  518. #endif   
  519. #ifdef FUNCTION_CALLS 
  520.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  521. #else 
  522.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  523. #endif   
  524.  
  525. #ifdef BY_TWO
  526.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  527.                         (*glColorP)((const GLfloat *) (pvcolor + *startvertindex));
  528.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  529.                         glColor3fv((const GLfloat *) (pvcolor + *startvertindex));
  530.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  531.                         glColor4fv((const GLfloat *) (pvcolor + *startvertindex));
  532.   #endif
  533.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  534.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *startvertindex));
  535.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  536.                         glTexCoord2fv((const GLfloat *) (ptexture + *startvertindex));
  537.   #endif
  538.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  539.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *startvertindex));
  540.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  541.                         glNormal3fv((const GLfloat *) (pvnorm + *startvertindex));
  542.   #endif
  543.   #ifdef FUNCTION_CALLS
  544.                         glVertex3fv((const GLfloat *) (pvert + *startvertindex));
  545.   #else
  546.                         (*glVertex3fvP)((const GLfloat *) (pvert + *startvertindex));
  547.   #endif
  548. #endif
  549.  
  550. }
  551. glEnd();
  552. #endif
  553. }
  554.  
  555.